<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>出库单写站级库日志</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="出库单工具">
<link rel="stylesheet" type="text/css" href="<%=path%>/easyui/themes/gray/easyui.css">
<link rel="stylesheet" type="text/css" href="<%=path%>/easyui/themes/icon.css">
<script type="text/javascript" src="<%=path%>/easyui/js/jquery.min.js"></script>
<script type="text/javascript" src="<%=path%>/easyui/js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path%>/easyui/js/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path%>/easyui/js/con_isok.js"></script>

</head>
<body class="easyui-layout">

<div data-options="region:'north',border:false" style="padding:2px;">
	<table align="">
		<tr>
			<td>出库单号:</td>
			<td><input id="ckd_no_id" class="easyui-numberbox" value=""></td>
			<td>IP地址: </td>
			<td><input id="ip_no_id" class="easyui-validatebox" value=""></td>
		</tr>
		<tr>
			<td>开始时间:</td>
				<td><input id="begin_time_id" class="easyui-datebox" data-options="editable:false">
			</td>
			<td>结束时间:</td>
				<td><input id="end_time_id" class="easyui-datebox" data-options="editable:false">
			</td>
		</tr>
		<tr>
			<td align="center"><a id="select_btn" href="javascript:void(0);" class="easyui-linkbutton" onclick="select_data1();">查询</a></td>
		</tr>
	</table>
</div>

<div data-options="region:'center', border:false" style="padding:2px;">
	<table id="dg" class="easyui-datagrid" data-options="
			url:'<%=path %>/ckd/selectCkdToStationLogs.do',
			fit:true,
			singleSelect:true,
			fitColumns: true,
			border:false,
			pagination: true
	">
		<thead>
			<tr>
				<th data-options="field:'ckdId',halign:'center', width:60, align:'center'">出库单ID</th>
				<th data-options="field:'ip',halign:'center', width:60, align:'center'">IP地址</th>
				<th data-options="field:'isok',halign:'center', width:60, align:'center', formatter:formatModel">同步状态</th>
				<th data-options="field:'inserttime',halign:'center', width:60, align:'center'">同步时间</th>
			</tr>
		</thead>
	</table>
</div>
	<script type="text/javascript">
		
		function formatModel(val,index,row){
			if(val == "1"){
				return "成功";
			}
			return "<b><font color='red'>失败</font></b>";
		}
	
		function select_data1(){
			isOkCon("", "<%=path %>","select_data()");
		}
		
		function select_data(){
			var ckdNo = $("#ckd_no_id").val();
			var ipAddress = $("#ip_no_id").val();
			var beginTime = $("#begin_time_id").datebox('getValue');
			var endTime = $("#end_time_id").datebox('getValue');
			
			$("#dg").datagrid('load', {
				ckdNo:ckdNo,
				ipAddress:ipAddress,
				beginTime:beginTime,
				endTime:endTime
			});
		}
		
		
	</script>
</body>
</html>
